#include "Xthread.h"
using namespace std;

void Xthread::Start()
{
	is_exit_ = false;
	th_ = thread(&Xthread::Main, this);
}

void Xthread::Stop()
{
	is_exit_ = true;
	Wait();
}

void Xthread::Wait()
{
	if (th_.joinable()) {
		th_.join();
	}
}

bool Xthread::is_exit()
{
	return is_exit_;
}
